function deposit(year, month, order){
    checklogin();
    //alert(year);
    var url = 'deposits/do_deposit';
    $("#the_content").html('');
    $("#the_waiting").html('<img src = "../images/spinner.gif" />');
    $.post(url, {
        year:year,
        month:month,
        order:order
    }, function(data) {
        if(data==-1){
            location.href=SITE_URL+"login";
            return;
        }
        $("#the_waiting").html('');
        $("#the_content").html(data).fadeIn();
    }, "html");

}

function deposit_all(key, order){
    checklogin();
    var url = 'deposits/do_deposit_all';
    $("#the_content").html('');
    $("#the_waiting").html('<img src = "../images/spinner.gif" />');
    $.post(url, {
        key:key,
        order:order
    }, function(data) {
        if(data==-1){
            location.href=SITE_URL+"login";
            return;
        }
        $("#the_waiting").html('');
        $("#the_content").html(data).fadeIn();
    }, "html");
}

function forefeited(order){
    checklogin();
    var url = 'deposits/do_forefeited';
    $("#the_content").html('');
    $("#the_waiting").html('<img src = "../images/spinner.gif" />');
    $.post(url, {
        order:order
    }, function(data) {
        if(data==-1){
            location.href=SITE_URL+"login";
            return;
        }
        $("#the_waiting").html('');
        $("#the_content").html(data).fadeIn();
    }, "html");
}
function printPartOfPage(elementId)
{
    var printContent = document.getElementById(elementId);
    var windowUrl = 'about:blank';
    var uniqueName = new Date();
    var windowName = 'Print' + uniqueName.getTime();
    var printWindow = window.open(windowUrl, windowName, 'left=50,top=50,width=500,height=500');

    printWindow.document.write('<link rel="stylesheet" type="text/css" href="../css/style_staff.css" />');
    printWindow.document.write(printContent.innerHTML);
    printWindow.document.close();
    printWindow.focus();
    printWindow.print();
    printWindow.close();
}